gtkpopcountprivate.h: Fix build on ARM/aarch64 Visual Studio
authorChun-wei Fan <fanchunwei@src.gnome.org>
Sat, 5 Jun 2021 07:37:52 +0000 (15:37 +0800)
committerChun-wei Fan <fanchunwei@src.gnome.org>
Sat, 5 Jun 2021 07:41:14 +0000 (15:41 +0800)
__popcnt() is not supported for ARM nor ARM64 Visual Studio builds, so we must
use the fallback implementation as intrinsics are not supported for this
purpose on ARM/ARM64 Visual Studio builds.

gtk/gtkpopcountprivate.h

index 8a99dd2b2684598ffb2805d65ec98f738065ee9c..df2282c985b2a54dce5acf968c71331464e140fb 100644 (file)
@@ -20,7 +20,7 @@
 
 #pragma once
 
-#if defined(_MSC_VER)
+#if defined(_MSC_VER) && !defined (_M_ARM) && !defined (_M_ARM64)
 #include <intrin.h>
 
 static inline guint